import {fromJS} from "immutable";

const reducer = (preState= {isShow: true}, action) => {
    const newState = fromJS(preState);
    if (action.type === "hideTab") {
        return newState.set("isShow", false).toJS();
    } else if (action.type === "showTab") {
        return newState.set("isShow", true).toJS();
    }
    return preState;
}

export default reducer;